<% include ../header %>
                <% if (operate.success) {%>
                <div class="alert alert-success"><a class="close" data-dismiss="alert" href="#">&times;</a><%= operate.msg%></div>
                <% }%>
                <div class="row-fluid">		
                    <a href="/admin/shop/create" class="btn btn-primary pull-right btn-sm"><span class="glyphicon glyphicon-plus"></span>添加新商家</a>		
                    <h3>商家管理</h1>
                </div>
                <div class="row-fluid">		
                <table class="table table-striped table-hover">
                    <thead>
                        <tr>
                            <th></th>
                            <th>商家</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <% for(var i=0;i<shopes.length;i++){ %>
                        <tr>
                            <td><%= i+1 %></td>
                            <td><%= shopes[i].name%></td>
                            <td>
					            <div class="pull-right">
						            <a href="/admin/shop/edit/<%= shopes[i].id %>" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-pencil"></span>编辑</a>
						            <a href="/admin/shop/delete/<%= shopes[i].id %>" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-trash"></span>删除</a>
					            </div>
				            </td>
			            </tr>				
			        <% } %>		
		            </tbody>
	            </table>
	            </div>    
<% include ../footer %>